﻿<navigation:Page x:Class="ProTemplate.Views.Examination" 
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
           xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
           xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
           mc:Ignorable="d"
           xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
           xmlns:telerikGridView="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView"
           xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
           xmlns:uc="clr-namespace:ProTemplate.UserControls"
           d:DesignWidth="640" d:DesignHeight="480"
           Title="商检">
    <Grid x:Name="LayoutRoot">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <uc:CommonToolBar x:Name="toolBar" IsShowSetExaminationStatusGroup="True" NewClick="toolBar_NewClick" EditClick="toolBar_EditClick" DeleteClick="toolBar_DeleteClick"  ChangeExaminationStatusClick="toolBar_ChangeExaminationStatusClick" ShowPrintButton="False" ExportToExcelClick="toolBar_ExportToExcelClick" ExportToWordClick="toolBar_ExportToWordClick" RefreshClick="toolBar_RefreshClick" BatchEditClick="toolBar_BatchEditClick" />
        <uc:DateFilterPanel Grid.Row="1" x:Name="dateFilter" OnSearch="dateFilter_OnSearch" SearchForCodeCaption="转单号：" />
        <telerikGridView:RadGridView telerik:Theming.Theme="Office_Blue" x:Name="gdExamination" Grid.Row="2" Style="{StaticResource CommonRadGridView}" 
                                     ItemsSource="{Binding Path=Items, Source={StaticResource ExaminationViewModel}}">
            <telerikGridView:RadGridView.Columns>
                <telerik:GridViewSelectColumn />
                <telerik:GridViewDataColumn Header="序号" DataMemberBinding="{Binding Index}" IsFilterable="False" />
                <telerik:GridViewDataColumn Header="商检编号" DataMemberBinding="{Binding ExaminationNumber}" />
                <telerik:GridViewDataColumn Header="客户名称" DataMemberBinding="{Binding CustomerName}" />
                <telerik:GridViewDataColumn Header="商品名称" DataMemberBinding="{Binding GoodsName}" />
                <telerik:GridViewDataColumn Header="数量/重量" DataMemberBinding="{Binding Quantity}" />
                <telerik:GridViewDataColumn Header="金额" DataMemberBinding="{Binding Amount}" />
                <telerik:GridViewDataColumn Header="转单号" DataMemberBinding="{Binding TransferNumber}" />
                <telerik:GridViewDataColumn Header="密码" DataMemberBinding="{Binding Password}" />
                <telerik:GridViewDataColumn Header="接收日期" DataMemberBinding="{Binding ReceivedDate, Converter={StaticResource ChineseDateConverter}}" />
                <telerik:GridViewDataColumn Header="商检状态" DataMemberBinding="{Binding ExaminationStatus}" />
                <telerik:GridViewDataColumn Header="运编号" DataMemberBinding="{Binding RelatedSystemNumber}" />
                <telerik:GridViewDataColumn Header="已关联本司单" DataMemberBinding="{Binding IsRelated}" />
                <telerik:GridViewDataColumn Header="商检费" DataMemberBinding="{Binding ExaminationFee}" />
                <telerik:GridViewDataColumn Header="商检成本" DataMemberBinding="{Binding ExaminationCost}" />
                <telerik:GridViewDataColumn Header="备注" DataMemberBinding="{Binding Remark}" />
                
            </telerikGridView:RadGridView.Columns>
        </telerikGridView:RadGridView>
        <telerik:RadDataPager x:Name="gdPager" Visibility="Collapsed" Grid.Row="3" Source="{Binding Items, ElementName=gdExamination}" Style="{StaticResource CommonGridViewPager}"/>
    </Grid>
</navigation:Page>
